<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">
<body>
    <ui:composition template="/WEB-INF/template.xhtml">
        <ui:define name="topnav">
            <ui:include src="/WEB-INF/incl/cust_nav.xhtml">
                <ui:param name="page" value="orders"/>
            </ui:include>
        </ui:define>

        <ui:define name="sidebar">
            <ui:include src="/WEB-INF/incl/login.xhtml" />
        </ui:define>
        
        <ui:define name="body">
            <h1>Your requests:</h1>
                
            <h:dataTable value="#{requests}" var="item"
                         styleClass="dvdtable" 
                         headerClass="dvdtablehead"
                         rowClasses="dvdtableodd,dvdtableeven"
                         columnClasses="dvdtablecol">
                <h:column>
                    <f:facet name="header">Request Id</f:facet>
                    #{item.id}
                </h:column>                        
                <h:column>
                    <f:facet name="header">RDate</f:facet>
                    <h:outputText value="#{item.requestDate}">
                        <f:convertDateTime type="both" dateStyle="full"/> 
                    </h:outputText>
                </h:column>                        
                <h:column>
                    <f:facet name="header">PDate</f:facet>
                    <h:outputText value="#{item.processDate}">
                        <f:convertDateTime type="both" dateStyle="full"/>
                    </h:outputText>
                </h:column>
                <h:column>
                    <f:facet name="header">Rectangle</f:facet>
                    #{item.startFrame}
                </h:column>
                <h:column>
                    <f:facet name="header">No. pieces</f:facet>
                    #{item.piecesSize}
                </h:column>
                <h:column>
                    <f:facet name="header">No. frames</f:facet>
                    #{item.framesSize}
                </h:column>
                <h:column>
                    <h:commandLink id="xyz" action="#{report.detailRequest}">
                        <h:commandButton value="details" /> 
                    </h:commandLink>
                </h:column>
            </h:dataTable>


            <c:if test="${request != null}">
                <div class="cntInfo">
                    <h2>Request Details</h2>
                </div>
            </c:if>

        </ui:define>
    </ui:composition>
</body>
</html>




